import { request } from '@/utils/request';

/**
 * 删除库存
 * @param params
 * @returns
 */
export function deleteTicketPackageDay(params: API.TicketPackageDay) {
  return request<API.BaseResult>(
    {
      url: '/packageDay/deleteTicketPackageDay',
      method: 'get',
      params,
    },
    {
      isGetDataDirectly: false,
    },
  );
}

/**
 * 添加库存
 * @param data
 * @returns
 */
export function insertTicketPackageDay(data: API.TicketPackageDay) {
  return request<API.BaseResult>(
    {
      url: '/packageDay/insertTicketPackageDay',
      method: 'post',
      data,
    },
    {
      isGetDataDirectly: false,
    },
  );
}

/**
 * 更新库存信息
 * @param data
 * @returns
 */
export function updateTicketPackageDay(data: API.TicketPackageDay) {
  return request<API.BaseResult>(
    {
      url: '/packageDay/updateTicketPackageDay',
      method: 'post',
      data,
    },
    {
      isGetDataDirectly: false,
    },
  );
}

/**
 * 查询所有库存信息
 * @param params
 * @returns
 */
export function selectAllTicketPackageDay(params: API.PageParams) {
  return request<API.BaseResult>(
    {
      url: '/packageDay/selectAll',
      method: 'get',
      params,
    },
    {
      isGetDataDirectly: false,
    },
  );
}

/**
 * 按条件查询库存信息
 * @param data
 * @param params
 * @returns
 */
export function selectPackageDayByExample(data: API.TicketPackageDay, params: API.PageParams) {
  return request<API.SeachResult<API.TicketPackageDay>>(
    {
      url: '/packageDay/selectByExample',
      method: 'post',
      data,
      params,
    },
    {
      isGetDataDirectly: true,
    },
  );
}

/**
 * 按ID查询库存信息详情
 * @param params
 * @returns
 */
export function selectPackageDayById(params: API.TicketPackageDay) {
  return request<API.BaseResult>(
    {
      url: '/packageDay/selectById',
      method: 'get',
      params,
    },
    {
      isGetDataDirectly: false,
    },
  );
}
